package com.guqiang.invocation;

import android.app.Activity;
import android.app.Application;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.os.IBinder;
import android.util.Log;

public class FakeInstrumentation extends Instrumentation {

    @Override
    public Activity newActivity(ClassLoader cl, String className, Intent intent) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        //这里为了简单 判断一下 如果是同事想启动的activity 那么就转到我自己的activity上来
        if ("com.longfor.dynamicproxyexample.TestOneActivity".equals(className)) {
            className = "com.guqiang.invocation.MainActivity";
        }
        className = "com.guqiang.invocation.MainActivity";
        return super.newActivity(cl, className, intent);
    }


}
